package com.chen.authority.model.dto;

import com.chen.authority.common.model.Dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 用户信息 数据传输对象
 *
 * @author chengy
 * @date 2022/11/27
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class UserInfoDto extends Dto {

    /**
     * id
     */
    @NotNull(message = "id不能为空")
    @ApiModelProperty(value = "id", required = true)
    private Integer id;

    /**
     * 名称
     */
    @NotBlank(message = "名称不能为空")
    @ApiModelProperty(value = "名称", required = true)
    private String name;

    /**
     * 手机号
     */
    @NotBlank(message = "手机号不能为空")
    @ApiModelProperty(value = "手机号", required = true)
    private String phoneNumber;

    /**
     * 邮箱
     */
    @NotBlank(message = "邮箱不能为空")
    @Email(message = "邮箱格式有误")
    @ApiModelProperty(value = "邮箱", required = true)
    private String email;

    /**
     * 性别（1男 0女）
     */
    @NotNull(message = "性别不能为空")
    @ApiModelProperty(value = "性别（1男 0女）", required = true)
    private Integer sex;

}